package com.ljxt.dt.service.storemanagementservice.impl;

import com.ljxt.dt.dao.storemanagementdao.IsDeleteDao;
import com.ljxt.dt.dao.storemanagementdao.impl.IsDeleteDaoImpl;
import com.ljxt.dt.service.storemanagementservice.IsdeleteService;
import com.ljxt.dt.web.servlet.storemanagementservlet.IsDelete;

/**
 * @author 唐春劲
 * @version 1.0.0
 * @date 2020-05-21 9:57
 * @copyright 老九学堂
 */

public class IsDeleteServiceImpl implements IsdeleteService {
    private IsDeleteDao admin = new IsDeleteDaoImpl();
    @Override
    public boolean isTrue(Integer id) {
        int row = admin.findPurchaseInfo(id);
        row+= admin.findRepectInfo(id);
        row+= admin.findStock(id);

        return row == 0;
    }
}
